#!/bin/bash

locales=("ar" "cs" "cz" "de" "es" "fr" "he" "hu" "it" "nl" "no" "pl" "pt" "ro" "ru" "sk" "sv" "tr" "zh" "zh_TW" "pt_BR")
site="http://mx-i18n.googlecode.com/svn/trunk/addons"
for locale in ${locales[@]}; do
	locale_file=messages.$locale.xml
	if [ -e $locale_file ]; then
		mv $locale_file $locale_file.bak
	fi
	curl -o $locale_file $site/$locale_file
	chmod 644 $locale_file
	chown www:wheel $locale_file
done